package com.example.demo_mysql_mybatisplus.util.api.crudFree.dto;


import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

@Data
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@NoArgsConstructor
@AllArgsConstructor
//@ApiModel(value = "自定义类型参数请求对象", description = "")
public class FreeQueryDto implements Serializable {
    private static final long serialVersionUID = 1L;

    /*
"pageNum": 1
    * */
    private Integer pageNum;
    /*
"pageSize": 10
    * */
    private Integer pageSize;

    /*
"resultsGroupField":"f1"
    * */
    private String smallGroupField;// 小分组字段：主要在分页中差异明显：每一页内独立分组
    private String bigGroupField;// 大分组字段：主要在分页中差异明显：按字段进行分页，而不是按记录进行分页
    /*
"orderBy": {
    "f1": "asc",
    "f2": "desc"
}
    * */
//    @ApiModelProperty(value = "排序规则")
    private Map<String, String> orderBy;

    /*
"specialReturnFields": [ "f1","f2","f3" ]
    * */
//    @ApiModelProperty(value = "返回对象的字段名称集合；指定要返回的字段，不填全部返回")
    private String[] specialReturnFields;

    /*
"authLimitCodes": [ "authCode1","authCode2","authCode3" ]
    * */
//    @ApiModelProperty(value = "权限限制码，通过limitCode指定要执行的条件或操作")
    private List<String> authLimitCodes;

    /*
"equalCondition": {
    "f0": 111,
    "f1": "v1",
    "f2": [ 222 ]
}
    * */
//    @ApiModelProperty(value = "精确查询，key为查询字段，value为查询目标值（允许单个值/列表")
    private Map<String, Object> equalCondition;

    /*
"notEqualCondition": {
    "f1": ["v1","v2"],
    "f2": [ 222,333 ]
}
    * */
//    @ApiModelProperty(value = "精确不查询，key为查询字段，value为查询目标值（只支持列表")
    private Map<String, List<Object>> notEqualCondition;

    /*
"rangeCondition": {
    "f1": "(1,100)",
    "f2": "[2,200]"
}
    * */
//    @ApiModelProperty(value = "范围查询（日期、数字），value为逗号分隔的起始值，左右括号指定开闭区间")
    private Map<String, String> rangeCondition;

    /*
"likeCondition": {
    "f1": "abc",
    "f2": "def"
}
    * */
//    @ApiModelProperty(value = "模糊查询，key为查询字段，value为查询目标值")
    private Map<String, String> likeCondition;


}
